<template>
  <div class="multimeter-test-container">
    <h1 class="page-title">万用表模拟测试</h1>
    <div class="multimeter-wrapper">
      <MultimeterComponent />
    </div>
    <div class="instruction-panel">
      <h3>使用说明</h3>
      <ul>
        <li><strong>功能切换：</strong>点击中间旋钮选择测量模式（电压、电阻、电流）</li>
        <li><strong>档位选择：</strong>选择模式后可以在上方选择具体的测量范围</li>
        <li><strong>功能按钮：</strong>
          <ul>
            <li>POWER - 电源开关</li>
            <li>HOLD - 数据保持功能</li>
            <li>LIGHT - 背光控制（30秒后自动关闭）</li>
            <li>AUTO OFF - 自动关机开关（60秒无操作自动关机）</li>
          </ul>
        </li>
        <li><strong>端口选择：</strong>点击下方端口可以模拟选择表笔连接的端口</li>
      </ul>
    </div>
  </div>
</template>

<script setup>
import MultimeterComponent from '../components/pop_up/MultimeterComponent.vue';
</script>

<style scoped>
.multimeter-test-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: Arial, sans-serif;
}

.page-title {
  color: white;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-size: 2.5em;
}

.multimeter-wrapper {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
}

.instruction-panel {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 25px;
  border-radius: 15px;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.instruction-panel h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.5em;
}

.instruction-panel ul {
  list-style-type: none;
  padding: 0;
}

.instruction-panel ul li {
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.instruction-panel ul li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: #3498db;
}

.instruction-panel ul ul {
  margin-top: 8px;
  margin-left: 20px;
}

.instruction-panel strong {
  color: #2c3e50;
}

@media (max-width: 768px) {
  .page-title {
    font-size: 2em;
  }
  
  .multimeter-wrapper {
    padding: 20px;
  }
  
  .instruction-panel {
    padding: 20px;
  }
}
</style>